package com.sky.service.user.impl;

import com.sky.entity.Dish;
import com.sky.service.common.CommonDishService;
import com.sky.vo.DishVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userDishService")
@Slf4j
public class DishServiceImpl implements com.sky.service.user.DishService {
    private final CommonDishService commonDishService;

    @Autowired
    public DishServiceImpl(CommonDishService commonDishService) {
        this.commonDishService = commonDishService;
    }

    /**
     * 根据分类id查询菜品
     * 通用方法
     * @param dish 菜品实体类
     * @return 菜品实体类VO
     */
    @Override
    public List<DishVO> listDishWithFlavor(Dish dish) {
        return commonDishService.listDishWithFlavor(dish);
    }
}
